// Copyright (c) 2025 coze-dev Authors
// SPDX-License-Identifier: Apache-2.0
.trace-tree-node {
  cursor: pointer;
  display: flex;

  .title {
    overflow: hidden;
    align-items: center;

    max-width: 168px;
    padding: 0 4px;

    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
    color: var(--coz-fg-primary);
    text-overflow: ellipsis;
    white-space: nowrap;

    border-radius: 4px;
  }

  &.error {
    .title {
      color: #FF441E;
    }

    &.selected {
      .title {
        background: #FFE0D2;
      }
    }

    &.hover {
      .title {
        background: #FFF3EE;
      }
    }
  }

  &.disabled {
    cursor: default;
    background-color: transparent;
  }
}

.icon-wrapper {
  display: flex;
  width: 16px;
  height: 16px;
  border-radius: 4px;

  svg {
    width: 100%;
    height: 100%;
  }
}

.node-container {
  .node-indicator {
    width: 2px;
    height: 16px;
    border-radius: 2px;
    transition: all 0.2s ease-in;
  }

  &_hover {
    background: var(--semi-color-info-light-default);
  }

  &_selected {
    background: var(--semi-color-info-light-default);

    .node-indicator {
      background-color: var(--semi-color-primary-hover);

    }
  }
}

.node-content {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
